package com.example.mushroom.service.impl;

import com.example.mushroom.entity.Statistics;
import com.example.mushroom.mapper.StatisticsMapper;
import com.example.mushroom.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class StatisticsServiceImpl implements StatisticsService {

    @Autowired
    private StatisticsMapper statisticsMapper;

    @Override
    public int insertStatistics(Statistics statistics) {
        return statisticsMapper.insertStatistics(statistics);
    }

    @Override
    public Statistics selectStatisticsById(Integer id) {
        return statisticsMapper.selectStatisticsById(id);
    }

    @Override
    public List<Statistics> selectAllStatistics() {
        return statisticsMapper.selectAllStatistics();
    }

    @Override
    public int updateStatistics(Statistics statistics) {
        return statisticsMapper.updateStatistics(statistics);
    }

    @Override
    public int deleteStatisticsById(Integer id) {
        return statisticsMapper.deleteStatisticsById(id);
    }

    @Override
    public List<Statistics> selectStatisticsByPage(int offset, int limit) {
        return statisticsMapper.selectStatisticsByPage(offset, limit);
    }
}